import requests
headers ={
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36'
}
url = 'http://gips3.baidu.com/it/u=3886271102,3123389489&fm=3028&app=3028&f=JPEG&fmt=auto?w=1280&h=960'
response = requests.get(url=url,headers=headers)

with open('tupian.jpg', 'wb') as f:
    print(len(response.content))
    print('开始写入')
    f.write(response.content)
    print('写入完成')
